#include <stdio.h>
// IDEA: Count words number. We can count according to thr first character, or the last of the word.
// This program according the first.

#define INW 1
#define OUTW 0

int main()
{
    int c;
    int state;
    int nw;

    nw = 0;
    state = OUTW;

    while ((c = getchar()) != EOF)
    {
        if (c == ' ' || c == '\t' || c == '\n')
            state = OUTW;
        else if (state == OUTW)
            state = INW,
            nw++;
    }
    printf("Word number is ( %d ).\n", nw);
    return 0;
}